package org.cocos2d.protocols;

import org.cocos2d.types.ccColor3B;


/// CC RGBA protocol
public interface CCRGBAProtocol {
    /**
     * returns the color
     *
     * @since v0.8
     */
    ccColor3B getColor();

    /**
     * sets Color
     *
     * @since v0.8
     */
    void setColor(ccColor3B color);

    /// returns the opacity
    int getOpacity();

    /**
     * sets the opacity.
     *
     * @warning If the the texture has premultiplied alpha then, the R, G and B channels will be modifed.
     * Values goes from 0 to 255, where 255 means fully opaque.
     */
    void setOpacity(int opacity);

    /**
     * sets the premultipliedAlphaOpacity property.
     * If set to NO then opacity will be applied as: glColor(R,G,B,opacity);
     * If set to YES then oapcity will be applied as: glColor(opacity, opacity, opacity, opacity );
     * Textures with premultiplied alpha will have this property by default on YES.
     * Otherwise the default value is NO
     *
     * @since v0.8
     */
    void setOpacityModifyRGB(boolean b);

    /**
     * returns whether or not the opacity will be applied using glColor(R,G,B,opacity)
     * or glColor(opacity, opacity, opacity, opacity);
     *
     * @since v0.8
     */
    boolean doesOpacityModifyRGB();
}

